This function extracts the n-th root of a given value.
The root is defined as follows:
result = \sqrt[root]{value} = value^{\frac{1}{root}}STEP 7 (TIA Portal) results in the following formula:
result = value ** (1 / root)LGF_NthRoot (FC) | ||||||||
---|---|---|---|---|---|---|---|---|
LReal | value | Ret_Val | LReal | |||||
LReal | root | error | Bool | |||||
status | Word | |||||||
Identifier | Data type | Description |
---|---|---|
value | LReal | Value from which the root should be calculated. |
root | LReal | Exponent of root |
Identifier | Data type | Description |
---|---|---|
Ret_Val | LReal | Returns the Nth root of a value |
error | Bool | FALSE: No error TRUE: An error occurred during the execution of the FB |
status | Word | 16#0000-16#7FFF: Status of the FB 16#8000-16#FFFF: Error identification (see following Table) |
Code / Value | Identifier / Description |
---|---|
16#0000 | STATUS_NO_ERROR Execution finished without errors |
16#8200 | ERR_NEG_VAR Error: Negative value for root exponend not permitted (Leads to complex numbers) |
Version & Date | Change description | |
---|---|---|
01.00.00 | Siemens Industry Online Support | |
19.08.2015 | First released version | |
01.00.01 | Siemens Industry Online Support | |
02.01.2017 | Upgrade: TIA Portal V14 Update 1 | |
01.00.02 | Siemens Industry Online Support | |
17.08.2018 | Upgrade: TIA V15 Update 2 | |
01.00.03 | Siemens Industry Online Support | |
23.11.2018 | Upgrade: TIA V15.1 | |
01.00.04 | Simatic Systems Support | |
17.01.2019 | Calculation changed | |
01.00.09 | Simatic Systems Support | |
13.11.2019 | Renamed from "LGF_XRoot" to "LGF_NthRoot" Regions, comments and constants are added | |
03.00.00 | Simatic Systems Support | |
23.04.2020 | Set version to V3.0.0, harmonize the version of the whole library | |
03.00.01 | Simatic Systems Support | |
12.11.2020 | Insert documentation |